package com.bjpowernode.config;
import com.netflix.client.config.IClientConfig;
import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class MyConfig {
    @Autowired
    IClientConfig config;
    @Bean
    public IRule rule() {
        System.out.println("MyRibbonConfig2.........................");
        RandomRule randomRule = new RandomRule();
        randomRule.initWithNiwsConfig(config);
        return randomRule;
    }
}
